/*
 * Copyright (c) 2024 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include "nativeFontNdk.h"

napi_property_descriptor desc[] = {
    {"oHDrawingMatchFontDescriptors001", nullptr, OHDrawingMatchFontDescriptors001,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingMatchFontDescriptors002", nullptr, OHDrawingMatchFontDescriptors002,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingMatchFontDescriptors003", nullptr, OHDrawingMatchFontDescriptors003,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingMatchFontDescriptors004", nullptr, OHDrawingMatchFontDescriptors004,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingMatchFontDescriptors005", nullptr, OHDrawingMatchFontDescriptors005,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingGetFontDescriptorByFullName001", nullptr, OHDrawingGetFontDescriptorByFullName001,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingGetFontDescriptorByFullName002", nullptr, OHDrawingGetFontDescriptorByFullName002,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingGetFontDescriptorByFullName003", nullptr, OHDrawingGetFontDescriptorByFullName003,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingGetFontDescriptorByFullName004", nullptr, OHDrawingGetFontDescriptorByFullName004,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingGetSystemFontFullNamesByType001", nullptr, OHDrawingGetSystemFontFullNamesByType001,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingGetSystemFontFullNamesByType002", nullptr, OHDrawingGetSystemFontFullNamesByType002,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingGetSystemFontFullNamesByType003", nullptr, OHDrawingGetSystemFontFullNamesByType003,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingGetSystemFontFullNamesByType004", nullptr, OHDrawingGetSystemFontFullNamesByType004,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingGetSystemFontFullNameByIndex001", nullptr, OHDrawingGetSystemFontFullNameByIndex001,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingCreateLineTypography001", nullptr, OHDrawingCreateLineTypography001,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingCreateLineTypography002", nullptr, OHDrawingCreateLineTypography002,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingCreateLineTypography003", nullptr, OHDrawingCreateLineTypography003,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingCreateLineTypography004", nullptr, OHDrawingCreateLineTypography004,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingLineTypographyGetLineBreak001", nullptr, OHDrawingLineTypographyGetLineBreak001,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingLineTypographyGetLineBreak002", nullptr, OHDrawingLineTypographyGetLineBreak002,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingLineTypographyGetLineBreak003", nullptr, OHDrawingLineTypographyGetLineBreak003,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingLineTypographyGetLineBreak004", nullptr, OHDrawingLineTypographyGetLineBreak004,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingLineTypographyGetLineBreak005", nullptr, OHDrawingLineTypographyGetLineBreak005,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingLineTypographyCreateLine001", nullptr, OHDrawingLineTypographyCreateLine001,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingLineTypographyCreateLine002", nullptr, OHDrawingLineTypographyCreateLine002,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingLineTypographyCreateLine003", nullptr, OHDrawingLineTypographyCreateLine003,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingLineTypographyCreateLine004", nullptr, OHDrawingLineTypographyCreateLine004,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingLineTypographyCreateLine005", nullptr, OHDrawingLineTypographyCreateLine005,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingLineTypographyCreateLine006", nullptr, OHDrawingLineTypographyCreateLine006,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingFontGetBounds001", nullptr, OHDrawingFontGetBounds001,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingFontGetBounds002", nullptr, OHDrawingFontGetBounds002,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingFontGetBounds003", nullptr, OHDrawingFontGetBounds003,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingRectDestroyArray001", nullptr, OHDrawingRectDestroyArray001,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingFontGetPathForGlyph001", nullptr, OHDrawingFontGetPathForGlyph001,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingFontGetPathForGlyph002", nullptr, OHDrawingFontGetPathForGlyph002,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingFontGetPathForGlyph003", nullptr, OHDrawingFontGetPathForGlyph003,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingFontGetPathForGlyph004", nullptr, OHDrawingFontGetPathForGlyph004,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingRectGetArraySize001", nullptr, OHDrawingRectGetArraySize001,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingRectGetArraySize002", nullptr, OHDrawingRectGetArraySize002,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingRectGetArrayElement001", nullptr, OHDrawingRectGetArrayElement001,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingCreateTextTab001", nullptr, OHDrawingCreateTextTab001,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingGetTextTabAlignment001", nullptr, OHDrawingGetTextTabAlignment001,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingGetTextTabLocation001", nullptr, OHDrawingGetTextTabLocation001,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingFontGetTextPath001", nullptr, OHDrawingFontGetTextPath001,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingGetDrawingArraySize001", nullptr, OHDrawingGetDrawingArraySize001,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingTypographyGetTextLines001", nullptr, OHDrawingTypographyGetTextLines001,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingTypographyGetTextLines002", nullptr, OHDrawingTypographyGetTextLines002,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingDestroyTextLine001", nullptr, OHDrawingDestroyTextLine001,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingGetTextLineByIndex001", nullptr, OHDrawingGetTextLineByIndex001,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingTextLineGetTextRange001", nullptr, OHDrawingTextLineGetTextRange001,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingTextLineGetGlyphRuns001", nullptr, OHDrawingTextLineGetGlyphRuns001,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingDestroyRuns001", nullptr, OHDrawingDestroyRuns001,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingGetRunByIndex001", nullptr, OHDrawingGetRunByIndex001,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingTextLinePaint001", nullptr, OHDrawingTextLinePaint001,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingTextLineCreateTruncatedLine001", nullptr, OHDrawingTextLineCreateTruncatedLine001,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingTextLineGetTypographicBounds001", nullptr, OHDrawingTextLineGetTypographicBounds001,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingTextLineGetImageBounds001", nullptr, OHDrawingTextLineGetImageBounds001,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingTextLineGetTrailingSpaceWidth001", nullptr, OHDrawingTextLineGetTrailingSpaceWidth001,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingTextLineGetStringIndexForPosition001", nullptr, OHDrawingTextLineGetStringIndexForPosition001,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingTextLineGetOffsetForStringIndex001", nullptr, OHDrawingTextLineGetOffsetForStringIndex001,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingTextLineGetAlignmentOffset001", nullptr, OHDrawingTextLineGetAlignmentOffset001,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingGetRunGlyphCount001", nullptr, OHDrawingGetRunGlyphCount001,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingGetRunStringRange001", nullptr, OHDrawingGetRunStringRange001,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingGetRunTypographicBounds001", nullptr, OHDrawingGetRunTypographicBounds001,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingGetRunStringIndicesByIndex001", nullptr, OHDrawingGetRunStringIndicesByIndex001,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingGetRunImageBounds001", nullptr, OHDrawingGetRunImageBounds001,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingGetRunGlyphsByIndex001", nullptr, OHDrawingGetRunGlyphsByIndex001,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingGetRunPositions001", nullptr, OHDrawingGetRunPositions001,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingGetFontCollectionGlobalInstance001", nullptr, OHDrawingGetFontCollectionGlobalInstance001,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingSetTextStyleBadgeType001", nullptr, OHDrawingSetTextStyleBadgeType001,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingSetTextStyleBadgeType002", nullptr, OHDrawingSetTextStyleBadgeType002,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingTypographyHandlerAddEncodedText001", nullptr, OHDrawingTypographyHandlerAddEncodedText001,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingTypographyHandlerAddEncodedText002", nullptr, OHDrawingTypographyHandlerAddEncodedText002,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingTypographyHandlerAddEncodedText003", nullptr, OHDrawingTypographyHandlerAddEncodedText003,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingTypographyHandlerAddEncodedText004", nullptr, OHDrawingTypographyHandlerAddEncodedText004,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingTypographyHandlerAddEncodedText005", nullptr, OHDrawingTypographyHandlerAddEncodedText005,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingTypographyHandlerAddEncodedText006", nullptr, OHDrawingTypographyHandlerAddEncodedText006,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingTypographyHandlerAddEncodedText007", nullptr, OHDrawingTypographyHandlerAddEncodedText007,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingTypographyHandlerAddEncodedText008", nullptr, OHDrawingTypographyHandlerAddEncodedText008,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingTypographyHandlerAddEncodedText009", nullptr, OHDrawingTypographyHandlerAddEncodedText009,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingGetRun001", nullptr, OHDrawingGetRun001,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingSetTypographyStyleAttributeDouble001", nullptr, OHDrawingSetTypographyStyleAttributeDouble001,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingSetTypographyStyleAttributeInt001", nullptr, OHDrawingSetTypographyStyleAttributeInt001,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingSetTextStyleAttributeDouble001", nullptr, OHDrawingSetTextStyleAttributeDouble001,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"oHDrawingSetTextStyleAttributeInt001", nullptr, OHDrawingSetTextStyleAttributeInt001,
     nullptr, nullptr, nullptr, napi_default, nullptr},
};

EXTERN_C_START
static napi_value Init(napi_env env, napi_value exports)
{
    napi_define_properties(env, exports, sizeof(desc) / sizeof(desc[0]), desc);
    return exports;
}
EXTERN_C_END

static napi_module demoModule = {
    .nm_version = 1,
    .nm_flags = 0,
    .nm_filename = nullptr,
    .nm_register_func = Init,
    .nm_modname = "nativeFontNdk",
    .nm_priv = ((void *)0),
    .reserved = {0},
};

extern "C" __attribute__((constructor)) void RegisterEntryModule(void) { napi_module_register(&demoModule); }